{% extends 'ahp/base.html' %}
{% block content %}

    <div class="center-container">
    <h4>评估结果（各场景试验效果的相对得分情况）</h4>
    <ol>
        {% for element in decision %}
            {% if element.0 == "0" %}
                No decision yet
            {% else %}
                <li> {{ element.0 }}: {{ element.1 }}</li>
            {% endif %}

        {% endfor %}
    </ol>
        <hr>
        <div class="criteria-container">
            <h3>试验评估的指标体系 </h3>

            <ul class="criterias">
                {% for field, value in criteria.get_fields %}
                    <li class="criterias">{{ field }} : {{ value }} </li>
                {% endfor %}
            </ul>
            <form action="{% url 'modify_criterias' pk=pk %}">
                <input type="submit" value="修改指标体系">
            </form>
        </div>
        <hr>
        <h3>试验场景列表</h3>

        {% for element in elements %}
            <div class="attributes">
                <a href="{% url 'modify_elements' pk=pk e_id=element.pk%}"><div class="image">
                    {% for field, value in element.get_fields %}
                        {% if field == "image" %}
                            <img src="/media/{{ value }}" alt="{{ value }}">
                        {% endif %}
                    {% endfor %}
                </div>
                </a>
                <ul class="description">
                    {% for field, value in element.get_fields %}
                        {% if field != "image" %}
                            <li>{{ field }} : {{ value }}</li>
                        {% endif %}
                    {% endfor %}
                </ul>
            </div>
        {% endfor %}


        <form action="{% url 'modify_elements' pk=pk e_id=0%}">
            <input type="submit" value="添加场景数据">
        </form>
        <hr>
        <form action="{% url 'solve' pk=pk %}">
            <input type="submit" class="solve" value="开始评估">
        </form>
    </div>
{% endblock %}